'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace COM

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
    <Guid(IID.COM.IMoniker)> _
    Public Interface IMoniker
        <PreserveSig()> Function GetClassID(<Out()> ByRef pClassID As Guid) As <MarshalAs(UnmanagedType.Error)> Integer

        <PreserveSig()> Function IsDirty() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Load(ByRef pstm As IOLE.IStream) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Save(ByRef pstm As IOLE.IStream, <MarshalAs(UnmanagedType.Bool)> ByVal fClearDirty As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetSizeMax(<Out()> ByRef pcbSize As ULong) As <MarshalAs(UnmanagedType.Error)> Integer

        <PreserveSig()> Function BindToObject(ByRef pbc As IBindCtx, ByRef pmkToLeft As IMoniker, ByRef riidResult As Guid, <Out(), MarshalAs(UnmanagedType.IUnknown)> ByRef ppvResult As Object) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function BindToStorage(ByRef pbc As IBindCtx, ByRef pmkToLeft As IMoniker, ByRef riid As Guid, <Out(), MarshalAs(UnmanagedType.IUnknown)> ByRef ppvObj As Object) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Reduce(ByRef pbc As IBindCtx, ByVal dwReduceHowFar As UInteger, ByRef ppmkToLeft As IMoniker, <Out()> ByRef ppmkReduced As IMoniker) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ComposeWith(ByRef pmkRight As IMoniker, <MarshalAs(UnmanagedType.Bool)> ByVal fOnlyIfNotGeneric As Boolean, <Out()> ByRef ppmkComposite As IMoniker) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function [Enum](<MarshalAs(UnmanagedType.Bool)> ByVal fForward As Boolean, <Out()> ByRef ppenumMoniker As OLE.IEnumMoniker) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function IsEqual(ByRef pmkOtherMoniker As IMoniker) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Hash(<Out()> ByRef pdwHash As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function IsRunning(ByRef pbc As IBindCtx, ByRef pmkToLeft As IMoniker, ByRef pmkNewlyRunning As IMoniker) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetTimeOfLastChange(ByRef pbc As IBindCtx, ByRef pmkToLeft As IMoniker, <Out()> ByVal pFileTime As FileTime) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Inverse(<Out()> ByRef ppmk As IMoniker) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function CommonPrefixWith(ByRef pmkOther As IMoniker, <Out()> ByRef ppmkPrefix As IMoniker) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function RelativePathTo(ByRef pmkOther As IMoniker, <Out()> ByRef ppmkRelPath As IMoniker) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetDisplayName(ByRef pbc As IBindCtx, ByRef pmkToLeft As IMoniker, <Out(), MarshalAs(UnmanagedType.LPWStr)> ByRef ppszDisplayName As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ParseDisplayName(ByRef pbc As IBindCtx, ByRef pmkToLeft As IMoniker, <MarshalAs(UnmanagedType.LPWStr)> ByVal pszDisplayName As String, <Out()> ByRef pchEaten As UInteger, <Out()> ByRef ppmkOut As IMoniker) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function IsSystemMoniker(<Out()> ByRef pdwMksys As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace
